public class Text {
    public static void main(String[] args) {
        MyDoubleLists myDoubleLists = new MyDoubleLists();
        myDoubleLists.addLast(1);
        myDoubleLists.addLast(2);
        myDoubleLists.addLast(3);
        myDoubleLists.addLast(4);
        myDoubleLists.addLast(5);
        myDoubleLists.addLast(6);
        myDoubleLists.loop(System.out::println, System.out::println);
    }
}
